The Compressor Information Structure
Your application can retrieve information describing the capabilities of compressors with the
GetCodecInfo
function (described on
GetCodecInfo
). The
CodecInfo
data type defines the format of the compressor information structure.
/* compressor information structure */
struct CodecInfo {
Str31 typeName; /* compression algorithm (codec type) */
short version; /* version supported by component */
short revisionLevel; /* version assigned by developer */
long vendor; /* developer of component */
long decompressFlags; /* decompression capability flags */
long compressFlags; /* compression capability flags */
long formatFlags; /* compression format flags */
unsigned char compressionAccuracy;
/* relative accuracy of this algorithm */
unsigned char decompressionAccuracy;
/* relative accuracy of this algorithm */
unsigned short compressionSpeed;
/* relative compression speed */
unsigned short decompressionSpeed;
/* relative decompression speed */
unsigned char compressionLevel;
/* relative compression of component */
char resvd; /* reserved--set to 0 */
short minimumHeight; /* minimum image height for component */
short minimumWidth; /* minimum image width for component */
short decompressPipelineLatency;
/* in milliseconds (asynchronous) */
short compressPipelineLatency;
/* in milliseconds (asynchronous) */
long privateData; /* reserved for use by Apple */
};
typedef struct CodecInfo CodecInfo;
-
typeName
-
Indicates the compression algorithm used by the component--for example,
'Animation'
. This Pascal string may be used to identify the compression algorithm to the user. The string always takes up 32 bytes no matter how long it is. The 32 bytes consist of 31 bytes plus one length byte. Apple Computer's Developer Technical Support group assigns these type names. The value of this field should correspond to the value of the
typeName
field in the appropriate compressor name structure returned by the
GetCodecNameList
function (see
"The Compressor Name Structure"
for information on the compressor name structure; see
GetCodecNameList
for information on the
GetCodecNameList
function).
-
version
-
Indicates the version of compressed data this component supports. The contents of this field should indicate the most recent version of the compression algorithm that the component can understand.
-
revisionLevel
-
Indicates the version of the component--for example,
0x00010001 (1.0.1)
. Developers of compressors assign these version numbers.
-
vendor
-
Identifies the developer of the component--for example,
'appl'
. The value of this field corresponds to the manufacturer code or application signature assigned to the developer.
-
decompressFlags
-
Contains flags that specify the decompression capabilities of the component. Typically, these flags are of interest only to developers of image decompressors. The bit values for this field are described in the discussion of image decompressors in
Inside Macintosh: QuickTime Components
.
-
compressFlags
-
Contains flags that specify the compression capabilities of the component. Typically, these flags are of interest only to developers of image compressors. The bit values for this field are described in the discussion of image compressors in
Inside Macintosh: QuickTime Components
.
-
formatFlags
-
Contains flags that describe the possible format for compressed data produced by this component and the format of compressed files that the component can handle during decompression. Typically, these flags are of interest only to developers of compressor components. The bit values for this field are described in the discussion of image compressor and decompressor components in
Inside Macintosh: QuickTime Components
.
-
compressionAccuracy
-
Indicates the relative accuracy of the compression algorithm employed by the component. Valid values for this field range from 0 to 255. A value of 0 means that the accuracy is unknown. Values from 1 to 255 provide a gauge for the relative accuracy of the compression algorithm--higher values indicate better accuracy.
-
The Image Compression Manager examines this field to determine which compressor component can most accurately compress a given image.
-
The
compressionAccuracy
field can only approximate the accuracy of a compression algorithm. Typically, compression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a compression request is issued, a precise measure of accuracy is not possible. However, the value of this field should still give a rough idea of the accuracy of the supported algorithm.
-
decompressionAccuracy
-
Indicates the relative accuracy of the decompression algorithm employed by the component. Valid values for this field range from 0 to 255. A value of 0 means that the accuracy is unknown. Values from 1 to 255 indicate the relative accuracy of the decompression technique--higher values mean better accuracy.
-
The Image Compression Manager examines this field to determine which decompressor component can most accurately decompress a given image.
-
The
decompressionAccuracy
field can only approximate the accuracy of a decompression algorithm. Typically, decompression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a decompression request is issued, a precise measure of accuracy is not possible. However, the value of this field should still give a rough idea of the accuracy of the supported algorithm.
-
compressionSpeed
-
Indicates the relative speed of the component for compression operations. Valid values for this field lie in the range from 0 to 65,535. A value of 0 means that the speed is unknown. Values from 1 to 65,535 correspond to the number of milliseconds the component requires to compress a 320-by-240 pixel image on a Macintosh II computer.
-
The Image Compression Manager examines this field to determine which compressor component can most quickly compress a given image.
-
decompressionSpeed
-
Indicates the relative speed of the component for decompression operations. Valid values for this field lie in the range from 0 to 65,535. A value of 0 means that the speed is unknown. Values from 1 to 65,535 correspond to the number of milliseconds the component requires to decompress a 320-by-240 pixel image on a Macintosh II computer.
-
The Image Compression Manager examines this field to determine which compressor component can most quickly decompress a given image.
-
compressionLevel
-
Indicates the relative compression achieved by this component. Valid values for this field lie in the range from 0 to 255. A value of 0 means that the compression level is unknown. Values from 1 to 255 map to percentage values of relative compression--lower values mean lesser compression. A value of 1 means no compression (0 percent); a value of 255 means maximum compression (100 percent).
-
The Image Compression Manager examines this field to determine which available compressor component will yield the smallest resulting data for a given image.
-
The
compressionLevel
field can only approximate the effectiveness of a compression algorithm. Typically, compression algorithms produce results of varying quality based on a variety of parameters, including image size and content. Since this information is not available until a compression request is issued, a precise measure of compression is not possible. However, the value of this field should still give a rough idea of the effectiveness of the supported algorithm.
-
resvd
-
Reserved for Apple. This field must be set to 0.
-
minimumHeight
-
Specifies the height in pixels of the smallest image the component can handle. Together with the
minimumWidth
field, this field defines the block size for the component. The Image Compression Manager does not issue compression or decompression requests for images smaller than the block size.
-
minimumWidth
-
Specifies the width in pixels of the smallest image the component can handle. Together with the
minimumHeight
field, this field defines the block size for the component. The Image Compression Manager does not issue compression or decompression requests for images smaller than the block size.
-
decompressPipelineLatency
-
Reserved for future use. This field must be set to 0.
-
compressPipelineLatency
-
Reserved for future use. This field must be set to 0.
-
privateData
-
Reserved for use by Apple. This field must be set to 0.
© 1999 Apple Computer, Inc.Previous | Overview | Contents | Next